from django.db import models


# Create your models here.
# 系统通知
class Notification(models.Model):
    title = models.CharField("通知标题", max_length=100)
    content = models.TextField("具体内容")
    publisher = models.ForeignKey('UserApp.User', on_delete=models.CASCADE, related_name="published_notices")
    publish_time = models.DateTimeField("发布时间", auto_now_add=True)
    receivers = models.ManyToManyField('UserApp.User', related_name="received_notices")  # 关联Django用户系统
